furny.entities
Class TextureData

java.lang.Object
  extended by furny.entities.TextureData

@Entity
public class TextureData
extends java.lang.Object

Value object to map a texture to a relational database.

Since:
10.08.2012
Author:
Stephan Dreyer

Field Summary
private  byte[] bytes
           
private  long id
           
 
Constructor Summary
TextureData()
          Default constructor.
TextureData(java.awt.image.BufferedImage bi)
          Constructor that creates a new texture from a BufferedImage.
 
Method Summary
 byte[] getBytes()
          Getter for the byte array of texture.
 long getId()
          Getter for the id.
 void setBytes(byte[] bytes)
          Setter for the byte array of texture.
 void setId(long id)
          Setter for the id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

private long id

bytes

private byte[] bytes
Constructor Detail

TextureData

public TextureData()
Default constructor.

Since:
10.08.2012

TextureData

public TextureData(java.awt.image.BufferedImage bi)
            throws java.io.IOException
Constructor that creates a new texture from a BufferedImage.

Parameters:
bi - The image.
Throws:
java.io.IOException - If IO fails.
Since:
10.08.2012
Method Detail

getId

public long getId()
Getter for the id.

Returns:
The id.
Since:
10.08.2012

setId

public void setId(long id)
Setter for the id.

Parameters:
id - The id.
Since:
10.08.2012

getBytes

public byte[] getBytes()
Getter for the byte array of texture.

Returns:
The texture as byte array.
Since:
10.08.2012

setBytes

public void setBytes(byte[] bytes)
Setter for the byte array of texture.

Parameters:
bytes - The texture as byte array.
Since:
10.08.2012